using CommunityToolkit.Maui;
using MauiTurntable.ViewModel;

namespace MauiTurntable;

public partial class NamePopup : ContentView
{
    IPopupService _popupService;
    public NamePopup(IPopupService popupService)
	{
		InitializeComponent();
        this.Loaded += NamePopup_Loaded;
        _popupService = popupService;

    }

    private void NamePopup_Loaded(object? sender, EventArgs e)
    {
        var mode = this.BindingContext as NamePopupViewModel;
        mode.popupService = _popupService;
    }
}